const BaseRoutes = require("./baseRoutes");
const userController = require("../controllers/userController");

const userRoutes = new BaseRoutes("/users", userController);

// 前置扩展路由写法
// userRoutes.router.get("/:id/users", userController.getUsersByDeptId);

/**
 * @swagger
 * /users:
 *   get:
 *     tags:
 *       - Users
 *     summary: 获取用户列表
 *     description: 获取所有用户信息
 *     responses:
 *       200:
 *         description: 用户列表
 */
const userRouteInstance = userRoutes.registerRoutes();

// 这里添加扩展路由
// userRouteInstance.get("/:id/depts", userController.getDeptsByUserId);

module.exports = userRouteInstance;
